<!-- /ezadm/template/board/ezbbs_config_update.htm :: 2010-03-03 :: ezdong & hamhaja -->
<script type="text/javascript">
//<![CDATA[
$(function() {
	//폼체크
	var container1 = $("div#lay_error_container1");
	$("form[name=update_form]").validate({
		errorContainer: container1,
		errorLabelContainer: $("ol", container1),
		wrapper: "li",
		rules: {
			ebcf_table_width: {
				number: true,
				min: 0
			},
			ebcf_subject_size: {
				number: true,
				min: 0
			},
			ebcf_new_hour: {
				number: true,
				min: 0
			},
			ebcf_hot_cnt: {
				number: true,
				min: 0
			},
			ebcf_row_num: {
				number: true,
				min: 0,
				max: 100
			},
			ebcf_page_num: {
				number: true,
				min: 0,
				max: 100
			},
			ebcf_link_num: {
				number: true,
				min: 0
			},
			ebcf_file_num: {
				number: true,
				min: -1,
				max: 100
			},
			ebcf_file_size: {
				number: true,
				min: 0
			},
			ebcf_img_width: {
				number: true,
				min: 0
			},
			ebcf_img_height: {
				number: true,
				min: 0
			}
		}
	});
});

function is_gallery(o)
{
	var f = o.form;
	if (o.checked)
	{
		var fnum = eval(f.elements['ebcf_file_num'].value);
		if (!fnum || fnum < 0) f.elements['ebcf_file_num'].value = 1;
		f.elements['ebcf_ext_list'].value = '.jpg|.gif|.bmp|.png';
		f.elements['ebcf_ext_flag'][1].checked = true;
	}
	else
	{
		f.elements['ebcf_ext_list'].value = '.exe|.htm|.php|.asp|.jsp|.cgi';
		f.elements['ebcf_ext_flag'][0].checked = true;
	}
}

function file_browser(callback)
{
	var url = '<?=$App->_url_admin?>/util/file_browser/tree.htm?&callback=' + callback;
	window.open(url, '', 'width=570,height=500,scrollbars=no');
}

function callback_header(str)
{
	var html = str.replace("<?=$App->_dir_root?>", "");
	document.forms['update_form'].elements['ebcf_header'].value = html;
}

function callback_footer(str)
{
	var html = str.replace("<?=$App->_dir_root?>", "");
	document.forms['update_form'].elements['ebcf_footer'].value = html;
}
//]]>
</script>

<form name='update_form' method='post' action="<?=$_SERVER['PHP_SELF']?>" target='form_receiver'>
<input type='hidden' name='g_job' value='<?=$g_job?>' />
<input type='hidden' name='g_subjob' value='update' />
<input type='hidden' name='ebcf_id' value="<?=$config_record['ebcf_id']?>" />
<input type='hidden' name='ebcf_skin1' value="default" />

	<table class="form2">
	<caption>게시판 설정관리</caption>
	<col width="6%" /><col width="94%" />
	<tr>
		<th>기<br />본<br />설<br />정</th>
		<td><table>
			<col width="15%" /><col width="35%" /><col width="15%" /><col width="35%" />
			<tr>
				<th>게시판명</th>
				<td><input type="text" name="ebcf_pname" class="full required" value="<?=$config_record['ebcf_pname']?>" title="게시판명을 입력하세요." /></td>
				<th>언어</th>
				<td><?=$Html->radio_button('ebcf_lang', $langs, $config_record['ebcf_lang'])?></td>
			</tr>
			<tr>
				<th>기본로직</th>
				<td><?=$Html->full_select_form('ebcf_logic1', array(''=>'=== 기본로직 ===') + $logic_list, $config_record['ebcf_logic1'], '_value', '_value')?></td>
				<th>적용로직</th>
				<td><?=$Html->full_select_form('ebcf_logic2', array(''=>'=== 적용로직 ===') + $logic_list, $config_record['ebcf_logic2'], '_value', '_value')?></td>
			</tr>
			<tr>
				<th>적용스킨</th>
				<td><?=$Html->full_select_form('ebcf_skin2', array(''=>'=== 적용스킨 ===') + $skin_list, $config_record['ebcf_skin2'], '_value', '_value')?></td>
				<th>적용css</th>
				<td><?=$Html->full_select_form('ebcf_css', array(''=>'=== 적용css ===') + $css_list, $config_record['ebcf_css'], '_value', '_value')?></td>
			</tr>
			<tr>
				<th>갤러리</th>
				<td><input type="checkbox" name="ebcf_gallery_flag" value="1" onclick="is_gallery(this);"<?php if ($config_record['ebcf_gallery_flag']) { ?> checked="checked"<?php } ?> id="ebcf_gallery_id" onfocus="this.blur()" /><label for="ebcf_gallery_id">갤러리게시판 적용</label></td>
				<td colspan="2" class="desc"><span class="blue">&gt;&gt;공지, 답글등이 기능이 제한됩니다.</span></td>
			</tr>
			<tr>
				<th>사용여부</th>
				<td><?=$Html->flag_button('ebcf_use_flag', $config_record['ebcf_use_flag'])?></td>
				<td colspan="2" class="desc"><span class="blue">&gt;&gt;"아니오"설정시 검색에 노출되지 않습니다.</span></td>
			</tr>
		</table></td>
	</tr>
	<tr>
		<th>출<br />력<br />옵<br />션</th>
		<td><table>
			<col width="15%" /><col width="13%" /><col width="72%" />
			<tr>
				<th>출력순서</th>
				<td><?=$Html->full_select_form('ebcf_order', $order_fields, $config_record['ebcf_order'])?></td>
				<td class="desc"><?=$Html->check_button('ebcf_order_flag', array('0' => '역순으로 출력'), array($config_record['ebcf_order_flag']))?></td>
			</tr>
			<tr>
				<th>테이블크기</th>
				<td><input type="text" class="full center required" name="ebcf_table_width" value="<?=$config_record['ebcf_table_width']?>" title="테이블크기를 입력하세요." /></td>
				<td class="desc"><span class="blue">&gt;&gt; 게시판의 전체 너비를 지정합니다.</span><span class="red">(100 보다 크면 px, 작으면 %로 적용됨)</span></td>
			</tr>
			<tr>
				<th>제목글자수</th>
				<td><input type='text' class='full center required' name='ebcf_subject_size' value="<?=$config_record['ebcf_subject_size']?>" title="제목글자수를 입력하세요." /></td>
				<td class="desc"><span class="blue">&gt;&gt; 목록에서 출력될 제목의 글자수를 지정합니다.</span><span class="red">(전체출력 : 0)</span></td>
			</tr>
			<tr>
				<th>NEW표시</th>
				<td><input type="text" class="full center required" name="ebcf_new_hour" value="<?=$config_record['ebcf_new_hour']?>" title="NEW표시를 입력하세요." /></td>
				<td class="desc"><span class="blue">&gt;&gt;NEW 아이콘 출력될 게시물 기준시간을 지정합니다.</span><span class="red">(단위는 시간, 미적용 : 0)</span></td>
			</tr>
			<tr>
				<th>HOT표시</th>
				<td><input type="text" class="full center required" name="ebcf_hot_cnt" value="<?=$config_record['ebcf_hot_cnt']?>" title="HOT표시를 입력하세요." /></td>
				<td class="desc"><span class="blue">&gt;&gt;HOT 아이콘이 출력될 게시물 기준 조회수를 지정합니다.</span><span class="red">(단위는 수, 미적용 : 0)</span></td>
			</tr>
			<tr>
				<th>게시물수</th>
				<td><input type="text" class="full center required" name="ebcf_row_num" value="<?=$config_record['ebcf_row_num']?>" title="게시물수를 입력하세요." /></td>
				<td class="desc"><span class="blue">&gt;&gt;목록 페이지에 출력될 게시물 수를 지정합니다.</span></td>
			</tr>
			<tr>
				<th>페이지수</th>
				<td><input type="text" class="full center required" name="ebcf_page_num" value="<?=$config_record['ebcf_page_num']?>" title="페이지수를 입력하세요." /></td>
				<td class="desc"><span class="blue">&gt;&gt;목록 페이지의 페이징에 표시될 페이지 수를 지정합니다.</span></td>
			</tr>
			<tr>
				<th>링크개수</th>
				<td><input type="text" class="full center required" name="ebcf_link_num" value="<?=$config_record['ebcf_link_num']?>" title="링크개수를 입력하세요." /></td>
				<td class="desc"><span class="blue">&gt;&gt;입력가능한 링크개수를 지정합니다.</span></td>
			</tr>
			<tr>
				<th>파일설정</th>
				<td colspan="2"><table>
					<col width="15%" /><col width="15%" /><col width="15%" /><col width="15%" /><col />
					<tr>
						<th style="background-color:#46779B; font-size:11px;">최대개수</th>
						<th style="background-color:#46779B; font-size:11px;">제한크기(MB)</th>
						<th style="background-color:#46779B; font-size:11px;">이미지너비</th>
						<th style="background-color:#46779B; font-size:11px;">이미지높이</th>
						<th style="background-color:#46779B; font-size:11px;">확장자 목록</th>
					</tr>
					<tr>
						<td><input type="text" class="full center required" name="ebcf_file_num" value="<?=$config_record['ebcf_file_num']?>" title="첨부파일 최대개수를 입력하세요." /></td>
						<td><input type="text" class="full center required" name="ebcf_file_size" value="<?=$config_record['ebcf_file_size']?>" title="첨부파일 제한크기를 입력하세요." /></td>
						<td><input type="text" class="full center required" name="ebcf_img_width" value="<?=$config_record['ebcf_img_width']?>" title="이미지 너비를 입력하세요." /></td>
						<td><input type="text" class="full center required" name="ebcf_img_height" value="<?=$config_record['ebcf_img_height']?>" title="이미지 높이를 입력하세요." /></td>
						<td><input type="text" class="full" name="ebcf_ext_list" value="<?=$config_record['ebcf_ext_list']?>" /></td>
					</tr>
					<tr>
						<td colspan="5" class="left"><?=$Html->radio_button('ebcf_ext_flag', array(0 => '해당 확장자 형태의 파일 업로드 불가능', 1 => '해당 확장자 형태의 파일만 업로드 가능'), $config_record['ebcf_ext_flag'])?></td>
					</tr>
				</table></td>
			</tr>
			<tr>
				<th>태그제한</th>
				<td colspan="2"><table>
					<col width="15%" /><col />
					<tr>
						<th style="background-color:#46779B; font-size:11px;">태그</th>
						<td>
							<input type="text" class="full center" name="ebcf_tag_list" value="<?=$config_record['ebcf_tag_list']?>" />
						</td>
					</tr>
					<tr>
						<td class="left" colspan="2">
							<?=$Html->radio_button('ebcf_tag_flag', array(0 => '해당 태그 허용', 1 => '해당 태그 제한'), $config_record['ebcf_tag_flag'])?>
						</td>
					</tr>
				</table></td>
			</tr>
			<tr>
				<th>일자포멧</th>
				<td colspan="2"><table>
					<col width="30%" /><col width="30%" /><col width="40%" />
					<tr>
						<th style="background-color:#46779B; font-size:11px;">목록페이지</th>
						<th style="background-color:#46779B; font-size:11px;">상세페이지</th>
						<td></td>
					</tr>
					<tr>
						<td><input type="text" class="full center required" name="ebcf_list_date" value="<?=$config_record['ebcf_list_date']?>" title="목록페이지 일자포멧을 입력하세요." /></td>
						<td><input type="text" class="full center required" name="ebcf_view_date" value="<?=$config_record['ebcf_view_date']?>" title="상세페이지 일자포멧을 입력하세요." /></td>
						<td class="desc"><a href="#" onclick="g_open(g_arg_url('<?=$g_job?>', 'date_format'), 950, 700); return false;"><span class="blue">&gt;&gt; 포멧형태 상세보기</span></a></td>
					</tr>
				</table></td>
			</tr>
		</table></td>
	</tr>
	<tr>
		<th>출<br />력<br />항<br />목</th>
		<td><table>
			<col width="15%" /><col width="75%" /><col width="10%" />
			<tr>
				<th>목록</th>
				<td colspan="2"><table>
					<col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" />
					<tr>
						<?php for ($i=0; $i<5; $i++) { ?>
						<td class="left" style="border:0px;"><?php if ($list_els[$i]) { ?><?=$list_els[$i]?><?php } ?></td>
						<?php } ?>
					</tr>
				</table></td>
			</tr>
			<tr>
				<th>입력</th>
				<td colspan="2"><table>
					<col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" />
					<tr>
						<?php for ($i=0; $i<5; $i++) { ?>
						<td class="left" style="border:0px;"><?php if ($input_els[$i]) { ?><?=$input_els[$i]?><?php } ?></td>
						<?php } ?>
					</tr>
				</table></td>
			</tr>
			<tr>
				<th>상세</th>
				<td colspan="2"><table>
					<col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" />
					<?php foreach ($detail_els as $els) { ?>
					<tr>
						<?php foreach ($els as $el) { ?>
						<td class="left" style="border:0px;"><?=$el?></td>
						<?php } ?>
					</tr>
					<?php } ?>
				</table></td>
			</tr>
			<tr>
				<th>검색</th>
				<td colspan="2"><table>
					<col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" /><col width="20%" />
					<tr>
						<?php for ($i=0; $i<5; $i++) { ?>
						<td class="left" style="border:0px;"><?php if ($search_els[$i]) { ?><?=$search_els[$i]?><?php } ?></td>
						<?php } ?>
					</tr>
				</table></td>
			</tr>
			<tr>
				<th>상단출력경로</th>
				<td><input type="text" name="ebcf_header" class="full" value="<?=$config_record['ebcf_header']?>" /></td>
				<td class="desc"><a href="#" onclick="file_browser('callback_header'); return false;"><img src="<?=$App->_url_admin?>/icon/search_button.gif" border="0" alt="검색" /></a></td>
			</tr>
			<tr>
				<th>하단출력경로</th>
				<td><input type="text" name="ebcf_footer" class="full" value="<?=$config_record['ebcf_footer']?>" /></td>
				<td class="desc"><a href="#" onclick="file_browser('callback_footer'); return false;"><img src="<?=$App->_url_admin?>/icon/search_button.gif" border="0" alt="검색" /></a></td>
			</tr>
		</table></td>
	</tr>
	</table>

	<div id="lay_error_container1" class="error_container">
		<ol>
			<li>에러 메세지!!</li>
		</ol>
	</div>


	<div class="util">
		<input type="submit" class="button" value="수정" />
		<input type="reset" class="button" value="초기화" />
		<input type="button" class="button" value="닫기" onclick="self.close();" />
	</div>

</form>